//
//  SQLiteDataBaseManger.h
//  18-SQLite
//
//  Created by GivenBmli on 16/8/8.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "Student.h"
@class Student;
NS_ASSUME_NONNULL_BEGIN
@interface SQLiteDataBaseManger : NSObject {
    sqlite3 *dbPoint;
}
//单例方法,一个工程中只包含这一个对象
+ (SQLiteDataBaseManger *)shareManger;
/**打开数据库*/
- (BOOL)openSQLite3;
/**关闭数据库*/
- (BOOL)closeSQLite3;
/**创建表*/
- (BOOL)createTable;
/**添加数据*/
- (BOOL)insertStu:(Student *)stu;
/**删除数据*/
-(BOOL)deleteStu:(Student *)stu;
/**删除全部*/
- (BOOL)deleteAll;
/**修改数据*/
- (BOOL)updateOldName:(NSString *)oldName newName:(NSString *)newName;
/**查询数据*/
- (NSArray *)selectAll;


@end
NS_ASSUME_NONNULL_END